﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using TRPOP.Common;
using TRPOP.CMS.Web.UI;
using TRPOP.CMS.Business;
using TRPOP.CMS.Model;
using System.Collections;

namespace TRPOP.CMS.Web.Admin
{
    public partial class UserBase_list : BaseAdmin
    {

        #region 当前页面权限验证
        protected override void SubPageInit()
        {
            base.m_SubPagePermission = Plugin.PermissionKeys.PermissionEnum.SystemManage_User;
        }
        #endregion

        #region 页面变量
        protected bool m_IsAdd = true;
        protected int m_id = 0;
        protected string m_Title = "";
        #endregion

        #region 页面事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }
        protected void lbtnDelete_Click(object sender, EventArgs e)
        {
            LinkButton lbtn = (LinkButton)sender;
            int intId = 0;
            int.TryParse(lbtn.CommandArgument, out intId);
            base.SaveLog(Plugin.LogKeys.OperObject.AdminOper, Plugin.LogKeys.OperResult.DelSubmit,intId.ToString());
            SubmitAlert(m_IAdminUser.DeleteUserInfoById(intId));//删除
            BindData();
        }
       
        #endregion

        #region 页面方法
        public void BindData()
        {
            rptList.DataSource = m_IAdminUser.GetListByConditionForRealPubCount(0, "and LogName!='admin'", " UserBaseId asc");
            rptList.DataBind();
        }
        #endregion
    }
}
